<template> 
    <div class="pay-result"> 
        <div class="succees " v-if="resultId==1">
            <div class="img-box text-center">
                <image  class="img-icon"  mode="aspectFit" src="https://rqys.hleason.com/dist/images/zhifuchenggong.png" ></image>
                <div class="result-text">支付成功</div>
                <div class="info-text">等待平台发货</div>
            </div>
            <div class="sub-btn text-center" @click="jumpPage(1)"> 返回 </div>
        </div> 
        <div class="failure " v-else>
            <div class="img-box text-center">
                <image  class="img-icon"  mode="aspectFit" src="https://rqys.hleason.com/dist/images/zhifushibai.png" ></image>
                <div class="result-text">支付失败，请重新支付</div>
                <div class="info-text">支付后，我们将尽快为您安排发货</div>
            </div>
            <div class="sub-btn text-center" @click="jumpPage(2)"> 返回 </div>
        </div> 
    </div> 
</template>

<script> 
import * as api from '@/utils/api' 
export default {
    onLoad(opt){  
        if(opt.payId==1){
            this.resultId=opt.payId;
        }else{
            this.resultId=opt.payId;
        }
    }, 
    data () {
        return {
           resultId:'1'
        }
    },
    methods:{ 
        jumpPage(val){
            if(val==1){
                wx.navigateBack({ delta: 2  });
            }else{
                wx.navigateBack({ delta: 1  });
            }
        }, 
    }, 
}

</script>
 
<style   lang="scss">
page{
    height:100%;
    background:#fff;
}
.pay-result{ 
   .succees,.failure{ 
       padding:20% 40rpx 0 40rpx;
       .img-box{
           .img-icon{
               width:140rpx;
               height:140rpx;
               border-raduis:50%;
           }
           .result-text{
               margin-top:30rpx;
               font-size:32rpx;
               color:#010101;
           }
           .info-text{
               margin-top:10rpx;
               font-size:26rpx;
               color:#999;
           }
       } 
       .sub-btn{
            width:100%;
            height:80rpx;
            line-height:80rpx;
            background:#CD4640;
            color:#fff;
            border-radius:10rpx;
            margin-top:45rpx;
        }   
        .sub-btn:active{
            background-color:rgba(205,70,64,0.5)
        }
   }
} 
</style>
